-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLI: Update renderer templates to provide correct typescript examples #21647
Conversation
@kasperpeulen @ndelangen given that we now provide a way to get templates from a community package, I wonder if the ts directory name change impacted them? Maybe we should also try and fallback to |
Tagging @IanVS as he was involved in changing the template names |
Ah, yeah my PR started out to only handle ts-legacy templates, and it evolved from there so I guess I missed all the normal ts folders in renderers that didn't have ts-legacy.
Can you point me to how that's documented? Do we know of any packages doing this so far? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was just wondering this morning why web-components didn't have TS in the sandbox. Thanks for cleaning up after me here.
code/renderers/web-components/template/cli/ts-4-9/Header.stories.ts
Outdated
Show resolved
Hide resolved
808602d
to
52a318b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should be clear for anyone creating a community template that can be installed via the CLI what the correct template directory names should be, but I think it's also good to allow a fallback if they don't completely follow it. @jonniebigodes do we have documentation for the community building new frameworks to install via our CL? I'm not sure where I'd even look for that.
I agree. We do have a fallback mechanism, but honestly I think there's no documentation anywhere 😓 |
@yannbf and @IanVS, we have the get started guide on building a framework here, but we don't have anything related to this. We'll need to expand that one and provide a more technical approach to how to build a framework and feature also the CLI templates as a part of it, mostly because it's where users will find out how to write stories for their components using a framework. |
Closes #21179
What I did
There was a change in the naming of directories inside of the CLI where
template/cli/ts
was split intotemplate/cli/ts-3-8
andtemplate/cli-ts-4-9
, but not all renderers had the directories renamed. This does that for:There's also Preact, which doesn't have typescript examples at all, but given it involves a little extra work (there's some conflicts with React errors), I'd say it could be done in a separate PR.
How to test
yarn task --task sandbox --start-from auto --template html-vite/default-ts
Checklist
MIGRATION.MD
Maintainers
make sure to add the
ci:merged
orci:daily
GH label to it.["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]